call setpath.bat
set IOTYPE=uart
rem set IOTYPE=keyScreen

set HAVE_MATH=

if "%IOTYPE%"=="keyScreen" set KEYSCREEN=-DKEYSCREEN=1

"nios2-elf-gcc" -S -Os inc/system.c -o system.s
"nios2-elf-gcc" -S -Os inc/uart.c -o uart.s
"nios2-elf-gcc" -S -Os inc/keyScreen.c -o keyScreen.s
"nios2-elf-gcc" -S -Os %HAVE_MATH% %KEYSCREEN% inc/print.c -o print.s
"nios2-elf-gcc" -S -Os tetris.cpp -o tetris.s
compile print.s,%IOTYPE%.s,system.s,inc\irq.asm,tetris.s tetris.temp.s dos out.bin
pause
